<style>
.shortCheckbox
{
    width:100px;
}

</style>

<div class="pageContent">
    <form method="post"
        action="${rc.getContextPath()}/manage/warehouse/saveWarehouse"
        class="pageForm required-validate"
        onsubmit="return validateCallback(this, dialogAjaxDone);">
        <div class="pageFormContent" >
            <input type="hidden" name="navTabId" value="${navTabId!''}">
            <input type="hidden" name="id" value="<#if (warehouse.warehouseCode)??>${warehouse.warehouseCode!''}</#if>">
            <fieldset>
                <dl>
                    <dt><@label key="WarehouseCode.C,colon">仓库编号：</@label></dt>
                    <dd>
                        <input name="warehouseCode" value="${warehouse.warehouseCode!''}" 
                              size="22" type="text" maxlength="20" class="required  alphanumeric toUp" warn="<@label key='WarehouseCode.C,alreadyExists'>仓库编号已存在</@label>"
                              <#if warehouse??>
                                  readonly="readonly"
                              <#else>
                                  remote="${rc.getContextPath()}/manage/warehouse/checkWarehouseCode"
                             </#if>
                        />
                    </dd>
                </dl>
                <dl>
                    <dt><@label key="WarehouseText.C,colon">仓库描述：</@label></dt>
                    <dd>
                        <input name="warehouseText"
                            value="${warehouse.warehouseText!''}"
                            size="22" type="text" maxlength="60" class="required" 
                            <#if "view"==pattern>
                              readonly="readonly"
                            </#if>
                          />
                    </dd>
                </dl>
                <dl>
                    <dt><@label key="WarehouseTypeCode.C,colon">仓库类型编号：</@label></dt>
                    <dd>
                        <input name="warehouseTypeCode" value="${warehouse.warehouseTypeCode!''}" 
                              size="22" type="text" maxlength="20" class="required" 
                              id="warehouseTypeCodeLookup.warehouseTypeCode" 
                              postField="warehouseTypeCode" suggestFields="warehouseTypeCode,warehouseTypeText" 
                              suggestUrl="${rc.getContextPath()}/manage/warehouseType/warehouseTypeSuggest" lookupGroup="warehouseTypeCodeLookup"
                              remote="${rc.getContextPath()}/manage/warehouseType/validateWarehouseTypeCode?orgWarehouseTypeCode=${warehouse.warehouseTypeCode!''}"
                              warn="<@label key='WarehouseTypeCode.C,doesNotExist.C'>仓库类别编号不存在</@label>"
                        />
                    </dd>
                </dl>
                <dl>
                    <dt><@label key="WarehouseTypeText.C,colon">仓库类型描述：</@label></dt>
                    <dd>
                        <input name="warehouseTypeText" id="warehouseTypeCodeLookup.warehouseTypeText"
                            value="${warehouse.warehouseTypeText!''}"
                            size="22" type="text" maxlength="60" class="required" 
                              readonly="readonly"
                          />
                    </dd>
                </dl>
                <dl>
                    <dt><@label key="place.C,colon">所在位置：</@label></dt>
                    <dd>
                        <input name="place" value="${warehouse.place!''}" 
                              size="22" type="text" maxlength="60" 
                        />
                    </dd>
                </dl>
                <dl>
                    <dd class="shortCheckbox">
                        <label><input type="checkbox" name="locationManageFlag" value="1"
                            <#if "view"==pattern>
                            disabled="disabled"
                            </#if>
                            <#if
                            (warehouse.locationManageFlag)?? && (warehouse.locationManageFlag == 1)>
                            checked="true"</#if>><@label key="locationManageFlag.C">启用库位</@label></label>
                    </dd>
                    <dd class="shortCheckbox">
                        <label><input type="checkbox" name="negativeInventoryFlag" value="1"
                            <#if "view"==pattern>
                            disabled="disabled"
                            </#if>
                            <#if
                            (warehouse.negativeInventoryFlag)?? && (warehouse.negativeInventoryFlag == 1)>
                            checked="true"</#if>><@label key="negativeInventoryFlag.C">允许负库存</@label></label>
                    </dd>
                    <dd class="shortCheckbox">
                        <label><input type="checkbox" name="lockFlag" value="1"
                            <#if "view"==pattern>
                            disabled="disabled"
                            </#if>
                            <#if
                            (warehouse.lockFlag)?? && (warehouse.lockFlag == 1)>
                            checked="true"</#if>><@label key="lock.C">锁定</@label></label>
                    </dd>
                </dl>
                
            </fieldset>
        </div>
        <#if warehouse??>
            <#assign createInfo=warehouse>
            <#include "/common/createInfo.html">
        </#if>
        <div class="formBar">
            <ul>
                <#if pattern!="view">
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit"><@label key="save.B">保存</@label></button>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="buttonActiveGrey">
                            <div class="buttonContent">
                                    <button type="button" class="close"><@label key="cancel.B">取消</@label></button>
                            </div>
                        </div>
                    </li>
                <#else>
                    <li>
                    <div class="buttonActive">
                        <div class="buttonContent">
                                <button type="button" class="close"><@label key="close.B">关闭</@label></button>
                        </div>
                    </div>
                </li>
                </#if>
            </ul>
        </div>
    </form>
</div>

